gusucode.com > 智睿政府网站管理系统 V2.1.0 > 智睿政府网站管理系统 V2.1.0\code\manage\Admin_MesEdit.asp

    <!--#include file="../Include/conn.asp"-->
<!--#include file="Admin_check.asp"-->
<%
response.expires = 0 
response.expiresabsolute = now() - 1 
response.addHeader "pragma","no-cache" 
response.addHeader "cache-control","private" 
Response.cachecontrol = "no-cache"
if Instr(session("AdminPurview"),"|113,")=0 then 
  response.write ("<font color='red')>你不具有该管理模块的操作权限,请返回!</font>")
  response.end
end if
'========判断是否具有管理权限 
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="javascript" src="images/Admin.js"></script>
<link href="images/Admin_css.css" type=text/css rel=stylesheet>
<title>问政中心</title></head>
<body>
<% 
dim Result
Result=request.QueryString("Result")
dim ReplyContent,ReplyTime,ID,MesName,Content,ViewFlag
dim Linkman,Telephone,AddTime,Unit,Typei,Audit
ID=request.QueryString("ID")
call MesEdit() 
%>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#6298E1">
  <tr>
    <td height="24" nowrap background="images/th_bg.gif"><font color="#FFFFFF"><STRONG>问政:审核,修改,回复问政相关的内容</STRONG></font></td>
  </tr>
  <tr>
    <td height="24" align="center" nowrap  bgcolor="#EBF2F9"><a href="Admin_MesList.asp">查看问政</a></td>
  </tr>
</table>
<br>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#6298E1">
  <form name="editForm" method="post" action="?Action=SaveEdit&Result=<%=Result%>&ID=<%=ID%>">
  <tr>
    <td height="24" nowrap bgcolor="#EBF2F9"><table width="100%" border="0" cellpadding="0" cellspacing="0" id=editProduct idth="100%">

      <tr>
        <td width="160" height="20" align="right">&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td height="20" align="right">问政主题:</td>
        <td><input name="MesName" type="text" class="textfield" id="MesName" style="WIDTH: 240;" value="<%=MesName%>">&nbsp;*</td>
      </tr>
      <tr>
        <td height="20" align="right" valign="top">问政内容:
        <td><textarea name="Content" rows="6" class="textfield" id="Content" style="WIDTH: 76%;"><%=Content%></textarea>&nbsp;*</td>
      </tr>
      <tr>
        <td height="20" align="right">留&nbsp;言&nbsp;者:</td>
        <td><%=Linkman%></td>
      </tr>
      <tr>
        <td height="20" align="right">受理单位:</td>
        <td><%=Unit%></td>
      </tr>
      <tr>
        <td height="20" align="right">类型:</td>
        <td><%=Typei%></td>
      </tr>
      <tr>
        <td height="20" align="right">电  话:</td>
        <td><input name="Telephone" type="text" class="textfield" id="Telephone" style="WIDTH: 240;" value="<%=Telephone%>"></td>
      </tr>
      <tr>
        <td height="20" align="right">电子邮箱:</td>
        <td><input name="Email" type="text" class="textfield" id="Email" style="WIDTH: 240" value="<%=Email%>" readonly></td>
      </tr>
      <tr>
        <td height="20" align="right">状  态:</td>
        <td>
		<input name="ViewFlag" type="checkbox" id="ViewFlag" value="1" style="HEIGHT: 13px;WIDTH: 13px;" <%if ViewFlag=1 then response.write ("checked")%>>&nbsp;通过审核
		&nbsp;问政公开:
		<input name="Audit" type="checkbox" id="Audit" value="1" style="HEIGHT: 13px;WIDTH: 13px;" <%if Audit=1 then response.write ("checked")%>>&nbsp;不公开显示
		</td>
      </tr>
      <tr>
        <td height="20" align="right">问政时间:</td>
        <td><input name="AddTime" type="text" class="textfield" id="AddTime" style="WIDTH: 240" value="<%=AddTime%>" readonly></td>
      </tr>
      <tr>
        <td height="20" align="right">回复时间:</td>
        <td><input name="ReplyTime" type="text" class="textfield" id="ReplyTime" style="WIDTH: 240" value="<%=ReplyTime%>"></td>
      </tr>
      <tr>
        <td height="20" align="right" valign="top">回复内容:</td>
        <td><textarea name="ReplyContent" rows="6" class="textfield" id="ReplyContent" style="WIDTH: 76%;"><%=ReplyContent%></textarea></td>
      </tr>
      <tr>
        <td height="30" align="right">&nbsp;</td>
        <td valign="bottom"><input name="submitSaveEdit" type="submit" class="button"  id="submitSaveEdit" value="保存" style="WIDTH: 80;" ></td>
      </tr>
      <tr>
        <td height="20" align="right">&nbsp;</td>
        <td valign="bottom"></td>
      </tr>
    </table></td>
  </tr>
  </form>
</table>
</BODY>
</HTML>
<%
sub MesEdit()
  dim Action,rsCheckAdd,rs,sql
  Action=request.QueryString("Action")
  if Action="SaveEdit" then '保存编辑管理员
    set rs = server.createobject("adodb.recordset")
    if len(trim(request.Form("MesName")))<1 then
      response.write ("<script language=javascript> alert('""问政主题""为必填项目,且不少于1个字符!');history.back(-1);</script>")
      response.end
    end if
    if len(trim(request.Form("Content")))<4 then
      response.write ("<script language=javascript> alert('""问政内容""为必填项目,且不少于10个字符!');history.back(-1);</script>")
      response.end
    end if
	if Result="Modify" then '修改网站管理员
      sql="select * from zhi_rui_g_Message where ID="&ID
      rs.open sql,conn,1,3
      rs("MesName")=trim(Request.Form("MesName"))
      rs("Content")= Request.Form("Content")
	  if Request.Form("ViewFlag")=1 then
        rs("ViewFlag")=1
	  else
        rs("ViewFlag")=0
	  end if
	  if Request.Form("Unit")=1 then
        rs("Unit")=1
	  else
        rs("Unit")=0
	  end if
	  	rs("ReplyContent")=Request.Form("ReplyContent")
	  if not (trim(request.Form("ReplyContent"))="" or trim(request.Form("ReplyTime"))<>"") then
	  	rs("ReplyTime")=now()
      end if
	end if
	rs.update
	rs.close
    set rs=nothing 
    response.write "<script language=javascript> alert('成功审核、编辑、回复问政!');location.replace('Admin_MesList.asp');</script>"
  else '提取问政
	if Result="Modify" then
      set rs = server.createobject("adodb.recordset")
      sql="select * from zhi_rui_g_Message where ID="& ID
      rs.open sql,conn,1,1
	  MesName=rs("MesName")
	  Content=rs("Content")
	  Linkman=rs("Linkman")
	  Unit=rs("Unit")
	  Typei=rs("Typei")
	  Audit=rs("Audit")
	  Telephone=rs("Telephone")
	  Email=rs("Email")
	  ViewFlag=rs("ViewFlag")
	  AddTime=rs("AddTime")
	  ReplyContent=rs("ReplyContent")
	  ReplyTime=rs("ReplyTime")
	  rs.close
      set rs=nothing 
	end if
  end if
end sub
%>